class Ship:
    def __init__(self):
        self.__name = ''
        self.__length = 0
        self.__live_points = []

    # 设置ship名称
    def set_name(self, name) -> None:
        self.__name = name

    # 获取ship名称
    def get_name(self) -> str:
        return self.__name

    # 获取ship在地图中标记的字母
    def get_short(self) -> str:
        return 'S'

    # 设置ship的长度
    def set_length(self, length) -> None:
        self.__length = length

    # 获取ship的长度
    def get_length(self) -> int:
        return self.__length

    # 判断ship是否包含point坐标
    def contains_point(self, point) -> bool:
        for it in self.get_live_points():
            if point.equals(it):
                return True
        return False

    # ship被攻击point
    def be_attacked_at(self, aim_point) -> None:
        points = self.get_live_points()
        for point in points:
            if aim_point.equals(point):
                points.remove(point)
                return

    # 判断ship是否存活
    def is_alive(self) -> bool:
        return len(self.get_live_points()) > 0

    # 设置初始存活points
    def set_live_points(self, points) -> None:
        self.__live_points = points

    # 返回direction属性
    def get_live_points(self) -> list:
        return self.__live_points
